package com.cwj.virtualapi.controller;

import com.cwj.virtualapi.service.TransmitService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/transmit")
public class TransmitController {

    private TransmitService transmitService;

    public TransmitController(TransmitService transmitService) {
        this.transmitService = transmitService;
    }

    @GetMapping
    public String transmitRequest(@RequestParam("url") String url) {
        return transmitService.transmitRequest(url);
    }
}
